package com.ljx.rbac.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ljx.rbac.domain.entity.Menu;
import com.ljx.rbac.domain.entity.Role;
import com.ljx.rbac.mapper.MenuMapper;
import com.ljx.rbac.mapper.RoleMapper;
import com.ljx.rbac.service.MenuService;
import com.ljx.rbac.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-10-03  21:35
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {

    @Autowired
    private MenuMapper menuMapper;

    @Override
    public List<Long> getMenuIdByRoleIds(List<Long> roles) {
        return menuMapper.getMenuIdByRoleIds(roles);
    }

    @Override
    public List<Menu> getMenuByIds(List<Long> menuIds) {
        return listByIds(menuIds);
    }
}
